package com.qust.cs;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JPanel;

public class Ground  {
	public BufferedImage img;
	public int x,y,height;
	public static int count=0;
	public int temp;	
	
	public Ground(){
		try {
			if(count==0){
			img=ImageIO.read(getClass().getResource("bg.jpg"));
			}else if(count==1){
			img=ImageIO.read(getClass().getResource("bg1.jpg"));
			}
			x=0;
			y=-174-1024*count;
			temp=y;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		count++;
		/*if(count==1){
			count=0;
		}*/
	}
	
	public void move(){
		y++;
		if(y==850){
			y=-1198;
		}	
	}
	
}
